import { createRouter, createWebHashHistory } from 'vue-router'
import Login from '@renderer/view/login/Login.vue'
import BaseView from '@renderer/view/BaseView.vue'
import Confirm from "@renderer/view/confirm/Confirm.vue";
import Theory from "@renderer/view/theory/Theory.vue";

const routes = [
  {
    path: '/login',
    component: Login,
    exact: true
  },
  {
    path: '',
    redirect: 'login'
  },
  {
    path: '/:pathMatch(.*)',
    redirect: 'login'
  },
  {
    path: '/',
    component: BaseView,
    children: [
      {
        path: '/confirm',
        name: 'confirm',
        component: Confirm,
      },
      {
        path: '/theory',
        name: 'theory',
        component: Theory,
      }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
